/* component type and subtype constants for the base image decompressor */
enum {
decompressorComponentType= FOUR_CHAR_CODE('imdc')
kBaseCodecType = FOUR_CHAR_CODE('base'),
};
/* selectors for component calls */
enum {
kImageCodecPreflightSelect= 0x0200,
kImageCodecInitializeSelect= 0x0201,
kImageCodecBeginBandSelect= 0x0202,
kImageCodecDrawBandSelect= 0x0203,
kImageCodecEndBandSelect= 0x0204,
kImageCodecQueueStartingSelect= 0x0205,
kImageCodecQueueStoppingSelect= 0x0206
};
struct ImageSubCodecDecompressCapabilities
{
long recordSize; /* size of this record */
long decompressRecordSize; /* size of decompress record */
Boolean canAsync; /* true if handles asynch decompression */
};
typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
struct ImageSubCodecDecompressRecord
{
Ptr baseAddr; /* base address of destination pixel map */
long rowBytes; /* bytes in each row */
Ptr codecData; /* pointer to compressed data */
ICMProgressProcRecord progressProcRecord; /* progress function record */
ICMDataProcRecord dataProcRecord; /* data-loading function structure */
void *userDecompressRecord; /* pointer to storage for result */
};
typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
pascal ComponentResult ImageCodecBeginBand ( ComponentInstance ci, CodecDecompressParams *params, ImageSubCodecDecompressRecord *drp, long flags);
pascal ComponentResult ImageCodecDrawBand ( ComponentInstance ci, ImageSubCodecDecompressRecord *drp);
pascal ComponentResult ImageCodecEndBand ( ComponentInstance ci, ImageSubCodecDecompressRecord *drp, OSErr result, long flags);
pascal ComponentResult ImageCodecInitialize ( ComponentInstance ci, ImageSubCodecDecompressCapabilities *cap);
pascal ComponentResult ImageCodecPreflight ( ComponentInstance ci, CodecDecompressParams *params);
pascal ComponentResult ImageCodecQueueStarting ( ComponentInstance ci);
pascal ComponentResult ImageCodecQueueStopping ( ComponentInstance ci);
CONST
{component type and subtype constants for the base image decompressor}
decompressorComponentType= 'imdc';
kBaseCodecType = 'base';
{selectors for component calls}
kImageCodecPreflightSelect= $200;
kImageCodecInitializeSelect= $201;
kImageCodecBeginBandSelect= $202;
kImageCodecDrawBandSelect= $203;
kImageCodecEndBandSelect= $204;
kImageCodecQueueStartingSelect= $205;
kImageCodecQueueStoppingSelect= $206;
ImageSubCodecDecompressCapabilities =
RECORD
recordSize: LongInt; {size of this record}
decompressRecordSize: LongInt; {size of decompress record}
canAsync: Boolean; {true if handles asynch decompression}
END;
ImageSubCodecDecompressRecord =
RECORD
baseAddr: Ptr; {base address of destination pixel map}
rowBytes: LongInt; {bytes in each row}
codecData: Ptr; {pointer to compressed data}
progressProcRecord: ICMProgressProcRecord; {progress function record}
dataProcRecord: ICMDataProcRecord; {data-loading function structure}
userDecompressRecord: Ptr; {pointer to storage for result}
END;
FUNCTION ImageCodecBeginBand (ci: ComponentInstance; VAR params: CodecDecompressParams; VAR drp: ImageSubCodecDecompressRecord; flags: LongInt): ComponentResult;
FUNCTION ImageCodecDrawBand (ci: ComponentInstance; drp: ImageSubCodecDecompressRecord): ComponentResult;
FUNCTION ComponentResult ImageCodecEndBand (ci: ComponentInstance; VAR drp: ImageSubCodecDecompressRecord; result: OSErr; flags: LongInt): ComponentResult;
FUNCTION ImageCodecInitialize (ci: ComponentInstance; VAR cap: ImageSubCodecDecompressCapabilities): ComponentResult;
FUNCTION ImageCodecPreflight (ci: ComponentInstance; VAR params: CodecDecompressParams): ComponentResult;
FUNCTION ImageCodecQueueStarting (ci: ComponentInstance): ComponentResult;
FUNCTION ImageCodecQueueStopping (ci: ComponentInstance): ComponentResult;